<%@ page language="java" contentType="text/html; charset=windows-1255"
    pageEncoding="windows-1255"%>
<%@ page errorPage="exceptionPage.jsp" %>
<%-- 
	This JSP handles the registration form to the web service. It has a complementary
	JS file which checks the possible client side errors before sending to the matching
	servlet.
 --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255"/>
<link href="css/templatemo_style.css" rel="stylesheet" type="text/css" />
<title>Registration</title>
<script type="text/javascript" src="js/general.js"></script>
</head>
<body>
<jsp:include page="header_part_1.html"/>
            <div id="templatemo_menu">
                <ul>
                    <li><a href="index.jsp">Home</a></li>
                    <li><a href="about.jsp">About Us</a></li>
                </ul>    	
            </div> <!-- end of templatemo_menu -->
<jsp:include page="header_part_2.html"/>
<div id="content">
<% if ( null == request.getSession().getAttribute("Error") ) {%> 
	<h3> Welcome To Our Registration</h3>
	<%} else { %> 
	<h3> <%=request.getSession().getAttribute("Error")%> </h3> <% request.getSession().removeAttribute("Error");}%>
			<form id="register_input" name="register_input" action="Registration" method="post" onsubmit="return validateinputregister();" >
			<div class="row"><label class="registerLabel" for="username">Username: </label>
			<input class="registerInputBox" type="text" name="username" id="username" />
			<span style="color:red" id="usernameillegal"></span>
			</div>
			<div class="row">
			<label  class="registerLabel" for="password">Password:&nbsp;</label>
			<input class="registerInputBox" type="password" name="password" id="password" />
			<span style="color:red" id="passwordillegal"></span>
			</div>
			<div class="row">
			<label class="registerLabel" for="repassword">Confirm Password:&nbsp;</label>
			<input class="registerInputBox" type="password" name="repassword" id="repassword" />
			<span style="color:red" id="repasswordillegal"></span>
			</div>
			<div class="row">
			<label class="registerLabel" for="firstname">First name:&nbsp; </label>
			<input class="registerInputBox" type="text" name="firstname" id="firstname" />
			<span style="color:red" id="firstnameillegal"></span>
			</div>
			<div class="row">
			<label class="registerLabel" for="lastname">Last name:&nbsp; </label>
			<input class="registerInputBox" type="text" name="lastname" id="lastname" />
			<span style="color:red" id="lastnameillegal"></span>
			</div>
			<div class="row">
			<label class="registerLabel" for="phone">Phone:&nbsp; </label>
			<input class="registerInputBox" type="text" name="phonepre" id="phonepre" /><span id="minus">&nbsp; - &nbsp;</span>  <input type="text" name="phonesuf" id="phonesuf" />
			<span style="color:red" id="phoneillegal"></span>
			</div>
			<div class="row">
			<label class="registerLabel" for="address">Address:&nbsp; </label>
			<input class="registerInputBox" type="text" name="address" id="address" />
			<span style="color:red" id="addressillegal"></span>
			</div>
			<div class="row">
			<label class="registerLabel" for="admin">Admin:&nbsp; </label>
			<input class="registerInputBox" type="checkbox" name="admin" id="admin" onclick="changeTextVisibilty()"/>
			</div>
			<div class="row" id="hiddenArea" style="display:none;">
			<label class="registerLabel" for="authenticationcode" >Admin Authentication:&nbsp; </label>
			<input class="registerInputBox" type="password" name="authenticationcode" id="authenticationcode" />
			<span style="color:red" id="authenticationcodeillegal"></span>
			</div>
			<br/>
			<input type="submit" value="Register"/>
			
		</form>
</div>
<jsp:include page="sidebar.jsp"/>
<jsp:include page="footer.html"/>
</body>
</html>